const HttpException=require('../exception/http.exception')
//404本身也是一种错误
const noMatchMiddleware = (req,res,next)=>{
    // res
    // .status(404)
    // .json({
    //     code:0,
    //     message:'url not found'
    // })
    const noMatchError=new HttpException(404,'访问路径不匹配','router url not found')
    next (noMatchError)  //错误放行
}

module.exports  = noMatchMiddleware




